package com.eduran.tuts.jfundamentals.model;

/**
 * Created by eduran on 16.10.2014.
 */
public class MethodOverload {
    public static void main(String[] args) {
        System.out.printf("Square of integer 7 is %d%n", square(7));
        System.out.printf("Square of integer 7.5 is %f%n", square(7.5));
    }

    private static int square(int i) {
        System.out.printf("nCalled square with int argument %d%n", i);
        return i * i;
    }
    private static double square(double i) {
        System.out.printf("nCalled square with int argument %f%n", i);
        return i * i;
    }
}
